<template>
  <basic-container>
    <el-tabs v-model="activeName">
      <el-tab-pane v-for="(row, index) in optionList" :key="index" :label="row.label" :name="row.name" />
    </el-tabs>
    <component
      :ref="activeName"
      :is="require(`@/views/supplier/myinfo/components/${activeName}`).default"
    />
  </basic-container>
</template>

<script>
import { getStore } from '@/util/store'
export default {
  name: 'SupplierInfo',
  provide() {
    return {
      id: this.supplierId
    }
  },
  data() {
    return {
      activeName: 'base-info',
      optionList: [
        { label: '基本信息', name: 'base-info' },
        { label: '联系人信息', name: 'contacts-info' },
        { label: '财务信息', name: 'finance-info' },
        { label: '资质信息', name: 'qualifications-info' },
        { label: '工厂/产品信息', name: 'factory-info' },
        { label: '设备/物流信息', name: 'equipment-info' }
      ],
      supplierId: getStore({ name: 'userInfo' }).user_id
    }
  },
  methods: {
    // handleClose() {
    //   this.$emit('update:visible', false)
    // }
  }
}
</script>
